import Vue from 'vue';
import Component from './no-data';
let MaskConstructor = Vue.extend(Component);
const instance = new MaskConstructor()

Vue.directive('no-data',{
    bind(el,{value,oldValue}) {
        instance.vm = instance.$mount();
        el.appendChild(instance.vm.$el);
        instance.vm.show = value;
    },
    update(el,{value,oldValue}) {
        if(value === oldValue) return;
        instance.vm.show = value;
    }
})